package com.ruoyi.laiwu.mapper;

import com.ruoyi.laiwu.domain.LwStationBase;
import com.ruoyi.laiwu.domain.vo.LwStationBaseVo;
import com.ruoyi.common.core.mapper.BaseMapperPlus;
import org.apache.ibatis.annotations.Select;

import java.util.List;
import java.util.Map;

/**
 * 测站基本属性Mapper接口
 *
 * @author ruoyi
 * @date 2023-12-12
 */
public interface LwStationBaseMapper extends BaseMapperPlus<LwStationBaseMapper, LwStationBase, LwStationBaseVo> {


    @Select("select COUNT(1) from lw_station_base where sttp = 'PP'")
    Integer queryPPNum();

    @Select("select sttp name,COUNT(1) value from lw_station_base where sttp = 'RQ' or sttp='' GROUP BY name")
    List<Map<String, Object>> sk_num();

    @Select("select * from (select stnm,stlc,lw_st_pptn_r_v.* from lw_station_base join lw_st_pptn_r_v on lw_station_base.stcd = lw_st_pptn_r_v.stcd ) a where a.stcd is not null order by daily_total desc")
    List<Map<String, Object>> queryjyl_tj();
}
